#!/bin/bash

# Go to directory of the run script
cd $(dirname $0)

# Define version
source version.sh

# Go to directory containing the binaries
cd ./bin

# Start monitor.
# This emulates a try-catch logic.
{
  ./getml-monitor & export MONITOR_PID=$!
   
  # If the user sends an interrupt signal, kill the monitor.
  trap "kill $MONITOR_PID" SIGINT SIGTERM 
} || {
  echo "Relboost monitor could not be launched."
}

# Run engine
./$GETML_VERSION-64bit
